﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Pyramid.Models
{
	/// <summary>
	/// 顾客消费记录
	/// </summary>
	public class ConsumeRecord
	{
		public int Id { get; set; }

		[Display(Name = "顾客")]
		public int CustomerId { get; set; }

		[Display(Name = "消费项目")]
		public int ConsumeItemId { get; set; }

		[Display(Name = "实际价格")]
		public decimal ActualPrice { get; set; }

		[Display(Name = "建档人")]
		[Required]
		[MaxLength(20)]
		public string CreateUserId { get; set; }

		[Display(Name = "建档日期")]
		public DateTime CreateTime { get; set; }

		[Display(Name = "最后修改时间")]
		public DateTime EditTime { get; set; }

		[Display(Name = "最后修改人")]
		[MaxLength(20)]
		[Required]
		public string EditUserId { get; set; }

		[Display(Name = "备注")]
		[MaxLength(200)]
		public string Remark { get; set; }

		[ForeignKey("ConsumeItemId")]
		public virtual ConsumeItem ConsumeItem { get; set; }

		[ForeignKey("CustomerId")]
		public virtual Customer Customer { get; set; }
	}
}